package repository

import (
	"Data-API-MCP/backend/internal/domain/entity"
	"context"
	"time"
)

// AuditRepository 审计日志仓储接口
type AuditRepository interface {
	// Create 创建审计日志
	Create(ctx context.Context, log *entity.AuditLog) error

	// GetByID 根据ID获取审计日志
	GetByID(ctx context.Context, id int64) (*entity.AuditLog, error)

	// List 获取审计日志列表
	List(ctx context.Context, userID int64, resource string, resourceID int64, startTime, endTime string, page, pageSize int) ([]*entity.AuditLog, int64, error)

	// Delete 删除审计日志
	Delete(ctx context.Context, id int64) error

	// DeleteByTime 根据时间范围删除审计日志
	DeleteByTime(ctx context.Context, before time.Time) error
}
